<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: thistle;
            /* white-space: pre-line; */
            /*
            normal:默认
            nowrap:不换行,遇到br标签换行(常用)
            pre:预格式化文本，保留空格，回车，Tab，不换行
            pre-wrap:显示空格，回车，自动换行
            pre-line:显示回车，不显示空格，自动换行
            */

            white-space: nowrap;
            overflow: hidden;
            /*clip:默认
            ellipsis:;
             */
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div>
        Lorem ipsum dolor sit amet consectetur adipisicing elit. Alias harum adipisci numquam deserunt amet earum animi quod, error molestias, nisi hic soluta maiores dolore, nulla voluptas voluptatibus. Ipsam, ea vero?
    </div>
    <pre>
        div{
            width: 200px;
            height: 200px;
            background-color: thistle;
            white-space: nowrap;
        }
    </pre>
</body>
</html>